﻿Namespace Validation
    Public Class HasItemsValidationRule
        Inherits ValidationRule

        Protected Overrides Function ValidateCore(ByVal value As Object, ByVal cultureInfo As System.Globalization.CultureInfo) As Boolean
            Dim list As IList = TryCast(value, IList)
            Return (list IsNot Nothing AndAlso list.Count > 0)
        End Function
    End Class
End Namespace
